package com.eatme.web.sys.repository;

import com.eatme.web.sys.entity.SysRole;
import com.eatme.web.sys.entity.SysUser;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

public interface SysRoleRepository extends JpaRepository<SysRole,Integer> {


    @Modifying
    @Query(value = "update sys_role set status = 0 where id = :id",nativeQuery=true)
    int updateSysRoleStatusById(@Param("id") Integer id);

}
